<template>
	<scroll-view>
		<uni-list>
			<uni-list-item v-on="event" @click="beclick(item)" v-bind="config" v-for="(item,index) in value"
				:key="index">
				<template v-slot:body>
					<view class="row-warpper box">
						<view class="col-warpper info-con">
							<view class="project-name">
								{{item.title}}
							</view>
							<view>
								<slot :info="item"></slot>
							</view>
						</view>
						<view class="option-con col-warpper">
							<view style="white-space: nowrap">{{item.create_time.substring(0,11)}}</view>
						</view>
					</view>
				</template>
			</uni-list-item>
		</uni-list>
	</scroll-view>
</template>

<script>
	export default {
		props: ["value", "config", "event"],
		methods: {
			/**
			 * 被点击
			 * @param {Object} item
			 */
			beclick(item) {
				console.log("beClick", item)
				this.$emit("beClick", item)
			}
		}
	}
</script>

<style lang="less" scoped>
	.box {
		width: 100%;

		.info-con {
			width: 80%;
			align-items: stretch;

			.project-name {
				font-size: 18px;
				padding: 5px 0;
				font-weight: 600;
			}

			.company-name {
				font-size: 12px;
				font-weight: 400;
				margin: 2px 0;
				// color: #C0C0C0
			}
		}

		.option-con {
			padding-left: 2px;

			.project-detail {
				margin-bottom: 2px;
			}

		}
	}
</style>
